package cn.stylefeng.guns.modular.storage.mapper;

import cn.stylefeng.guns.modular.storage.entity.StoragePut;
import cn.stylefeng.guns.modular.storage.model.params.StoragePutParam;
import cn.stylefeng.guns.modular.storage.model.result.StoragePutResult;
import cn.stylefeng.guns.modular.storage.model.result.StoragePutSingleResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 入库单表 Mapper 接口
 * </p>
 *
 * @author zhucx
 * @since 2019-07-09
 */
public interface StoragePutMapper extends BaseMapper<StoragePut> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    List<StoragePutResult> customList(@Param("paramCondition") StoragePutParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") StoragePutParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    Page<StoragePutResult> customPageList(@Param("page") Page page, @Param("paramCondition") StoragePutParam paramCondition, @Param("condition") String condition
    		,@Param("deptId") Long deptId,@Param("operateId")Long operateId);


    /**
     * 获取分页实体列表
     * （手机端带数量的）
     *
     * @author zhucx
     * @param deptId 
     * @Date 2019-07-09
     */
    Page<StoragePutResult> customPageListANDNUM(@Param("page") Page page, @Param("paramCondition") StoragePutParam paramCondition, @Param("condition") String condition, @Param("deptId")Long deptId);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2019-07-09
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") StoragePutParam paramCondition);

	StoragePut findByThelastone();

	StoragePutResult findBySpec(@Param("paramCondition") StoragePutParam paramCondition);

	Page<StoragePutResult> findPageBySpecStorageList(@Param("page")Page page, @Param("paramCondition")StoragePutParam param,  @Param("deptId")Long deptId);

	Page<StoragePutResult> querylistPageBySpec(@Param("page")Page pageContext, @Param("paramCondition")StoragePutParam param, @Param("condition")String condition, @Param("deptId")Long deptId
			,@Param("operateId")Long operateId,@Param("singlePutTime")String singlePutTime);

    StoragePutResult findSpec(@Param("paramCondition")StoragePutParam storagePutParam);

	List<StoragePutResult> findPageBySpecANDNUMNew(@Param("paramCondition") StoragePutParam paramCondition, @Param("condition") String condition, @Param("deptId")Long deptId);

	List<StoragePutResult> findPageBySpecStorageListNew(@Param("paramCondition")StoragePutParam param, @Param("deptId")Long deptId, @Param("operateId")Long operateId);

	List<StoragePutResult> findPageBySpecNew(@Param("paramCondition")StoragePutParam param, @Param("condition")String condition,  @Param("deptId")Long deptId);
}
